<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title> lucode 众筹 </title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="Shortcut Icon" href="http://lucode-1251927515.file.myqcloud.com/favicon.ico"/>
    <link rel="stylesheet" href="../res/layui/css/layui.css">
    <link rel="stylesheet" href="../res/css/global.css">
</head>
<body style="margin-top: 20px;">

<script id="detail" type="text/html">
    <div class="layui-container">

        <div class="layui-col-md12 content detail">
            <div class="fly-panel detail-box">
                <div style="display: none" id="postId">{{d.CmsPost.id}}</div>
                <h1>{{d.CmsPost.title}}</h1>
                <div class="fly-detail-info">
                    {{d.CmsPost.isStick}}
                    {{d.CmsPost.state}}
                    <span class="layui-badge layui-bg-red"> {{d.CmsPost.typeId}}</span>

                    <!--<div class="fly-admin-box" data-id="123">-->
                    <!--<span class="layui-btn layui-btn-xs jie-admin" type="del">删除</span>-->

                    <!--<span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="1">置顶</span>-->
                    <!-- <span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="0" style="background-color:#ccc;">取消置顶</span> -->

                    <!--<span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="1">加精</span>-->
                    <!--&lt;!&ndash; <span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="0" style="background-color:#ccc;">取消加精</span> &ndash;&gt;-->
                    <!--</div>-->
                    <span class="fly-list-nums">
            <i class="iconfont" title="人气">&#xe60b;</i>{{d.CmsPost.readCount}}</span>
                </div>
                <div class="detail-about">
                    <a class="fly-avatar" href="../user/home.html?userId={{d.UserInfoModel.userId}}">
                        <img src="{{d.UserInfoModel.avatar}}"
                             alt="头像">
                    </a>
                    <div class="fly-detail-user">
                        <a href=".../user/home.html?userId={{d.UserInfoModel.userId}}" class="fly-link">
                            <cite>{{d.UserInfoModel.nickname}}</cite>
                            <!--<i class="iconfont icon-renzheng" title="认证信息： rows.user.approve "></i>-->
                            <i class="layui-badge fly-badge-vip">VIP3</i>
                        </a>
                        <span>{{d.CmsPost.gmtModify}}</span>
                    </div>
                    <br/>
                    <div class="detail-hits" id="LAY_jieAdmin" data-id="123">
                        <span style="padding-right: 10px; color: #FF7200"> 众筹目标: {{d.CmsPost.cash}} 人民币</span>
                    </div>
                </div>
                <hr class="layui-bg-orange">
                <button class="layui-btn layui-btn-radius layui-btn-lg layui-btn-fluid layui-anim-rotate" id="join">我要参与</button>
                <hr class="layui-bg-orange">
                <div class="detail-body photos">
                    {{d.CmsPost.content}}
                </div>
            </div>

            <div class="fly-panel detail-box" id="flyReply">
                <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
                    <legend>留言</legend>
                </fieldset>

                <!--留言循环输出-->
                <ul class="jieda" id="jieda">
                    {{# layui.each(d.ReplyList, function(index, item){ }}
                    <li data-id="111" class="jieda-daan">
                        <a name="item-1111111111"></a>
                        <div class="detail-about detail-about-reply">
                            <a class="fly-avatar" href="">
                                <img src="{{item.avatar}}" alt="">
                            </a>
                            <div class="fly-detail-user">
                                <a href="" class="fly-link">
                                    <cite>{{item.nickname}}</cite>
                                    <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                                    <i class="layui-badge fly-badge-vip">VIP3</i>
                                </a>
                                <span style="color:#FF9E3F">（社区群众）</span>
                            </div>
                            <div class="detail-hits">
                                <span>{{item.gmtCreate}}</span>
                            </div>
                        </div>
                        <div class="detail-body jieda-body photos">
                            <p>{{item.content}}</p>
                        </div>
                        <div class="jieda-reply">
                            <!--
                            class  zanok  表示已赞
                            --->
                            <div class="layui-form layui-form-pane"><!--记住这个 div 必须要加-->
                                <form action="/cmsPostReply/addZan/" method="post">
                                    <div class="layui-form-item">
                                        <input type="hidden" name="replyId" value="{{item.id}}">
                                        <div lay-filter="zan" lay-submit>
                                            <span class="jieda-zan" type="zan">
                                              <i class="iconfont icon-zan" id="zanIcon{{item.id}}"></i>
                                              <em id="zanCount{{item.id}}">{{item.zanCount}}</em>
                                            </span>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </li>
                    {{# }); }}
                    {{# if(d.ReplyList.length === 0){ }}
                    <!-- 无数据时 -->
                    <li class="fly-none">扁桃炎！轮到你发言了！！！</li>
                    {{# } }}
                </ul>
                <!--回复框-->
                <div class="layui-form layui-form-pane">
                    <!--统一index.js里面 ajax 请求-->
                    <form action="/cmsPostReply/save/" method="post">
                        <div class="layui-form-item layui-form-text">
                            <a name="comment"></a>
                            <div class="layui-input-block">
                            <textarea id="L_content" name="content" required lay-verify="required" placeholder="请输入内容"
                                      class="layui-textarea fly-editor" style="height: 150px;"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <input type="hidden" name="userId" value="{{d.CmsPost.userId}}">
                            <input type="hidden" name="postId" value="{{d.CmsPost.id}}">
                            <button class="layui-btn" lay-filter="Replay001" lay-submit>提交</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>


    </div>

</script>

<div id="view"></div>

<script src="../res/layui/layui.js"></script>
<script src="../../common/lucode.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>

<script>

    layui.cache.page = 'jie';
    layui.config({
        version: "3.0.0"
        , base: '/lucode-for-all-web/cms/res/mods/'
    }).extend({
        fly: 'index'
    }).use(['fly', 'face'], function () {
        var $ = layui.$
            , fly = layui.fly;
    });
</script>

</body>
</html>